﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WebSieuThi
{
    public partial class TrangChu : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["isLogin"] != null)
            {
                if ((bool)Session["isLogin"] != false)
                {
                    string str = "Chào bạn " + Session["username"] + "<input id=\"Button2\" type=\"button\" value=\"Đăng xuất\" onclick=\"dangxuat();\"/>";
                    loginsv.InnerHtml = str;

                    string str1 = "";

                    if (Session["authen"].ToString() == "TN")
                    {
                        str1 += "<h2 class=\"title\"><a href=\"ThuNgan/BanHang.aspx\">Bán hàng</a></h2><h2 class=\"title\"><a href=\"ThuNgan/KhachHangThanThiet.aspx\">Khách hàng thân thiết</a></h2>";
                    }

                    if (Session["authen"].ToString() == "PP")
                    {
                        str1 += "<h2 class=\"title\"><a href=\"PhanPhoi/NhapHang.aspx\">Nhập hàng</a></h2><h2 class=\"title\"><a href=\"PhanPhoi/BaoCao.aspx\">Báo cáo</a></h2>";
                    }

                    if (Session["authen"].ToString() == "QL")
                    {
                        str1 += "<h2 class=\"title\"><a href=\"QuanLi/ThongKe.aspx\">Thống kê</a></h2><h2 class=\"title\"><a href=\"QuanLi/QuanLiHang.aspx\">Quản lí hàng</a></h2><h2 class=\"title\"><a href=\"QuanLi/QuiDinhKhachHang.aspx\">Qui định khách hàng</a></h2>";
                    }

                    if (Session["authen"].ToString() == "TH")
                    {
                        str1 += "<h2 class=\"title\"><a href=\"TinHoc/QuanLiTaiKhoan.aspx\">Quản lí tài khỏan</a></h2>";
                        
                    }

                    updatessv.InnerHtml = str1;

                    
                }
            }
            
        }
    }
}
